summaryrefslogtreecommitdiff
path: root/models/�Could not read POST from stdin��Could not write POST to stdout��re...
diff options
context:
space:
mode:
authorelectrodude <electrodude@users.noreply.github.com>2016-05-23 13:52:26 -0400
committerAuke Kok <sofar+github@foo-projects.org>2016-05-23 10:52:26 -0700
commit10bfa30b93a896c8c4a565ef3b9984c76ab4b592 (patch)
tree7fc1ca48c1966ef0d4ddb28f33f981b48d840b60 /models/�Could not read POST from stdin��Could not write POST to stdout��repo.enable-remote-branches=%d�[cgit] Error opening %s: %s (%d)�������[cgit] Error renaming %s to %s: %s (%d)��������<table class=
parent649c7d79f6d70251d9da93ca1c648ca2d9cc5562 (diff)
Fixed settings file leak and invalid io.close (#136)
Before, init.lua called io.open on pipeworks.worldpath..'/pipeworks_settings.txt' to see if it existed, but did not close the resulting file handle if it was found to exist. It instead erroneously called io.close() with no argument, which does nothing if the default output file is set to stdout, which it is. Now, the result of io.open is saved to a local variable. If that value is not nil (i.e. if the world settings file exists), the file handle is passed to io.close before calling dofile. Also, this saves pipeworks.worldpath..'/pipeworks_settings.txt' to a local variable to reduce redundancy.
Diffstat (limited to 'models/�Could not read POST from stdin��Could not write POST to stdout��repo.enable-remote-branches=%d�[cgit] Error opening %s: %s (%d)�������[cgit] Error renaming %s to %s: %s (%d)��������<table class=')
0 files changed, 0 insertions, 0 deletions